/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package EC;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author TrangNHIT
 */
@Embeddable
public class OrderDetailsPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "Pro_ID")
    private int proID;
    @Basic(optional = false)
    @Column(name = "Order_ID")
    private int orderID;

    public OrderDetailsPK() {
    }

    public OrderDetailsPK(int proID, int orderID) {
        this.proID = proID;
        this.orderID = orderID;
    }

    public int getProID() {
        return proID;
    }

    public void setProID(int proID) {
        this.proID = proID;
    }

    public int getOrderID() {
        return orderID;
    }

    public void setOrderID(int orderID) {
        this.orderID = orderID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) proID;
        hash += (int) orderID;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof OrderDetailsPK)) {
            return false;
        }
        OrderDetailsPK other = (OrderDetailsPK) object;
        if (this.proID != other.proID) {
            return false;
        }
        if (this.orderID != other.orderID) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "EC.OrderDetailsPK[proID=" + proID + ", orderID=" + orderID + "]";
    }

}
